﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WarOfDev.EF;

namespace WarOfDev.Web.ViewModels.MappingToModel
{
    public static class ModuleMapping
    {
        public static Module ToModel(this ModuleViewModel vm)
        {
            Module model = new Module();
            model.Id = vm.Id;
            model.ModuleName = vm.ModuleName;
            model.ParentId = vm.ParentId;
            model.CreatedBy = vm.CreatedBy;
            model.CreatedOn = vm.CreatedOn;
            model.ModifiedBy = vm.ModifiedBy;
            model.IsLocked = vm.IsLocked;
            model.Description = vm.Description;

            return model;
        }
    }
}